﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Smart.Common
{
    public partial class xucBarB : xucBase
    {
        public event ButtonClickEventHander AddClick;
        public event ButtonClickEventHander CancleClick;
        public event ButtonClickEventHander ChangeClick;
        public event ButtonClickEventHander ClearClick;
        public event ButtonClickEventHander CloseClick;
        public event ButtonClickEventHander ConstructClick;
        public event ButtonClickEventHander CopyClick;
        public event ButtonClickEventHander DeleteClick;
        public event ButtonClickEventHander EditClick;
        public event ButtonClickEventHander ExportClick;
        public event ButtonClickEventHander HelpClick;
        public event ButtonClickEventHander HistoryClick;
        public event ButtonClickEventHander ImportClick;
        public event ButtonClickEventHander InventoryClick;
        public event ButtonClickEventHander MirrorClick;
        public event ButtonClickEventHander OptionClick;
        public event ButtonClickEventHander PermisionClick;

        public event ButtonClickEventHander PrintClick;

        public event ButtonClickEventHander ProductDetailClick;

        public event ButtonClickEventHander ReadDataByIdClick;

        public event ButtonClickEventHander ReadDataFromFileClick;

        public event ButtonClickEventHander ReadLayoutClick;

        public event ButtonClickEventHander RefreshClick;

        public event ButtonClickEventHander RestoreDataTempClick;

        public event ButtonClickEventHander SaveClick;

        public event ButtonClickEventHander SaveDataByIdClick;

        public event ButtonClickEventHander SaveDataTempClick;

        public event ButtonClickEventHander SaveDataToFileClick;

        public event ButtonClickEventHander SaveLayoutClick;

        public event ButtonClickEventHander SaveNewClick;

        public event ButtonClickEventHander SearchClick;

        public event ButtonClickEventHander SelectAllClick;
        public xucBarB()
        {
            InitializeComponent();
            this.ucBar.AddClick += new ButtonClickEventHander(this.ucToolBar_AddClick);
            this.ucBar.SaveClick += new ButtonClickEventHander(this.ucToolBar_SaveClick);
            this.ucBar.SaveNewClick += new ButtonClickEventHander(this.ucToolBar_SaveNewClick);
            this.ucBar.CancleClick += new ButtonClickEventHander(this.ucToolBar_CancleClick);
            this.ucBar.PrintClick += new ButtonClickEventHander(this.ucToolBar_PrintClick);
            this.ucBar.CloseClick += new ButtonClickEventHander(this.ucToolBar_CloseClick);
            this.ucBar.DeleteClick += new ButtonClickEventHander(this.ucToolBar_DeleteClick);
            this.ucBar.ClearClick += new ButtonClickEventHander(this.ucToolBar_ClearClick);
            this.ucBar.ProductDetailClick += new ButtonClickEventHander(this.ucToolBar_ProductDetailClick);
            this.ucBar.HistoryClick += new ButtonClickEventHander(this.ucToolBar_HistoryClick);
            this.ucBar.SearchClick += new ButtonClickEventHander(this.ucToolBar_SearchClick);
            this.ucBar.InventoryClick += new ButtonClickEventHander(this.ucToolBar_InventoryClick);
            this.ucBar.SaveDataTempClick += new ButtonClickEventHander(this.ucToolBar_SaveTempClick);
            this.ucBar.RestoreDataTempClick += new ButtonClickEventHander(this.ucToolBar_RestoreTempClick);
            this.ucBar.SaveDataToFileClick += new ButtonClickEventHander(this.ucToolBar_SaveToFileClick);
            this.ucBar.ReadDataFromFileClick += new ButtonClickEventHander(this.ucToolBar_ReadFromFileClick);
            this.ucBar.SaveLayoutClick += new ButtonClickEventHander(this.ucToolBar_SaveLayoutClick);
            this.ucBar.ReadLayoutClick += new ButtonClickEventHander(this.ucToolBar_ReadLayoutClick);
            this.ucBar.SelectAllClick += new ButtonClickEventHander(this.ucToolBar_SelectAllClick);
            this.ucBar.ExportClick += new ButtonClickEventHander(this.ucToolBar_ExportClick);
            this.ucBar.SaveDataByIdClick += new ButtonClickEventHander(this.ucToolBar_SaveDataByIDClick);
            this.ucBar.ReadDataByIdClick += new ButtonClickEventHander(this.ucToolBar_ReadDataByIDClick);
            this.ucBar.CopyClick += new ButtonClickEventHander(this.ucBar_CopyClick);
            this.ucBar.RefreshClick += new ButtonClickEventHander(this.ucBar_RefreshClick);
            this.ucBar.HelpClick += new ButtonClickEventHander(this.ucBar_HelpClick);
            this.ucBar.CustomColumnClick += new ButtonClickEventHander(this.ucBar_CustomColumnClick);
            this.ucBar.FaceDefaultClick += new ButtonClickEventHander(this.ucBar_FaceDefaultClick);
        }

        protected virtual void CustomColumn()
        {
        }

        public virtual void FaceDefault()
        {
        }

        private void RaiseAddClickEventHander()
        {
            if (this.AddClick != null)
            {
                this.AddClick(this);
            }
        }

        private void RaiseCancleClickEventHander()
        {
            if (this.CancleClick != null)
            {
                this.CancleClick(this);
            }
        }

        private void RaiseChangeClickEventHander()
        {
            if (this.ChangeClick != null)
            {
                this.ChangeClick(this);
            }
        }

        private void RaiseClearClickEventHander()
        {
            if (this.ClearClick != null)
            {
                this.ClearClick(this);
            }
        }

        private void RaiseCloseClickEventHander()
        {
            if (this.CloseClick != null)
            {
                this.CloseClick(this);
            }
        }

        private void RaiseConstructClickEventHander()
        {
            if (this.ConstructClick != null)
            {
                this.ConstructClick(this);
            }
        }

        private void RaiseCopyClickEventHander()
        {
            if (this.CopyClick != null)
            {
                this.CopyClick(this);
            }
        }

        private void RaiseDeleteClickEventHander()
        {
            if (this.DeleteClick != null)
            {
                this.DeleteClick(this);
            }
        }

        private void RaiseEditClickEventHander()
        {
            if (this.EditClick != null)
            {
                this.EditClick(this);
            }
        }

        private void RaiseExportEventHander()
        {
            if (this.ExportClick != null)
            {
                this.ExportClick(this);
            }
        }

        private void RaiseHelpClickEventHander()
        {
            if (this.HelpClick != null)
            {
                this.HelpClick(this);
            }
        }

        private void RaiseHistoryClickEventHander()
        {
            if (this.HistoryClick != null)
            {
                this.HistoryClick(this);
            }
        }

        private void RaiseImportClickEventHander()
        {
            if (this.ImportClick != null)
            {
                this.ImportClick(this);
            }
        }

        private void RaiseInventoryClickEventHander()
        {
            if (this.InventoryClick != null)
            {
                this.InventoryClick(this);
            }
        }

        private void RaiseMirrorClickEventHander()
        {
            if (this.MirrorClick != null)
            {
                this.MirrorClick(this);
            }
        }

        private void RaiseOptionClickEventHander()
        {
            if (this.OptionClick != null)
            {
                this.OptionClick(this);
            }
        }

        private void RaisePermisionClickEventHander()
        {
            if (this.PermisionClick != null)
            {
                this.PermisionClick(this);
            }
        }

        private void RaisePrintClickEventHander()
        {
            if (this.PrintClick != null)
            {
                this.PrintClick(this);
            }
        }

        private void RaiseProductDetailClickEventHander()
        {
            if (this.ProductDetailClick != null)
            {
                this.ProductDetailClick(this);
            }
        }

        private void RaiseReadDataByIdClickEventHander()
        {
            if (this.ReadDataByIdClick != null)
            {
                this.ReadDataByIdClick(this);
            }
        }

        private void RaiseReadFromFileClickEventHander()
        {
            if (this.ReadDataFromFileClick != null)
            {
                this.ReadDataFromFileClick(this);
            }
        }

        private void RaiseReadLayoutClickEventHander()
        {
            if (this.ReadLayoutClick != null)
            {
                this.ReadLayoutClick(this);
            }
        }

        private void RaiseRefreshClickEventHander()
        {
            if (this.RefreshClick != null)
            {
                this.RefreshClick(this);
            }
        }

        private void RaiseRestoreTempClickEventHander()
        {
            if (this.RestoreDataTempClick != null)
            {
                this.RestoreDataTempClick(this);
            }
        }

        private void RaiseSaveClickEventHander()
        {
            if (this.SaveClick != null)
            {
                this.SaveClick(this);
            }
        }

        private void RaiseSaveDataByIdClickEventHander()
        {
            if (this.SaveDataByIdClick != null)
            {
                this.SaveDataByIdClick(this);
            }
        }

        private void RaiseSaveLayoutClickEventHander()
        {
            if (this.SaveLayoutClick != null)
            {
                this.SaveLayoutClick(this);
            }
        }

        private void RaiseSaveNewClickEventHander()
        {
            if (this.SaveNewClick != null)
            {
                this.SaveNewClick(this);
            }
        }

        private void RaiseSaveTempClickEventHander()
        {
            if (this.SaveDataTempClick != null)
            {
                this.SaveDataTempClick(this);
            }
        }

        private void RaiseSaveToFileClickEventHander()
        {
            if (this.SaveDataToFileClick != null)
            {
                this.SaveDataToFileClick(this);
            }
        }

        private void RaiseSearchClickEventHander()
        {
            if (this.SearchClick != null)
            {
                this.SearchClick(this);
            }
        }

        private void RaiseSelectAllClickEventHander()
        {
            if (this.SelectAllClick != null)
            {
                this.SelectAllClick(this);
            }
        }

        private void ucBar_CopyClick(object sender)
        {
            this.RaiseCopyClickEventHander();
        }

        private void ucBar_CustomColumnClick(object sender)
        {
            this.CustomColumn();
        }

        private void ucBar_FaceDefaultClick(object sender)
        {
            this.FaceDefault();
        }

        private void ucBar_HelpClick(object sender)
        {
            this.RaiseHelpClickEventHander();
        }

        private void ucBar_RefreshClick(object sender)
        {
            this.RaiseRefreshClickEventHander();
        }

        private void ucToolBar_AddClick(object sender)
        {
            this.RaiseAddClickEventHander();
        }

        private void ucToolBar_CancleClick(object sender)
        {
            this.RaiseCancleClickEventHander();
        }

        private void ucToolBar_ClearClick(object sender)
        {
            this.RaiseClearClickEventHander();
        }

        private void ucToolBar_CloseClick(object sender)
        {
            if (base.ParentForm != null)
            {
                base.ParentForm.Close();
            }
        }

        private void ucToolBar_DeleteClick(object sender)
        {
            this.RaiseDeleteClickEventHander();
        }

        private void ucToolBar_ExportClick(object sender)
        {
            this.RaiseExportEventHander();
        }

        private void ucToolBar_HistoryClick(object sender)
        {
            this.RaiseHistoryClickEventHander();
        }

        private void ucToolBar_InventoryClick(object sender)
        {
            this.RaiseInventoryClickEventHander();
        }

        private void ucToolBar_PrintClick(object sender)
        {
            this.RaisePrintClickEventHander();
        }

        private void ucToolBar_ProductDetailClick(object sender)
        {
            this.RaiseProductDetailClickEventHander();
        }

        private void ucToolBar_ReadDataByIDClick(object sender)
        {
            this.RaiseReadDataByIdClickEventHander();
        }

        private void ucToolBar_ReadFromFileClick(object sender)
        {
            this.RaiseReadFromFileClickEventHander();
        }

        private void ucToolBar_ReadLayoutClick(object sender)
        {
            this.RaiseReadLayoutClickEventHander();
        }

        private void ucToolBar_RestoreTempClick(object sender)
        {
            this.RaiseRestoreTempClickEventHander();
        }

        private void ucToolBar_SaveClick(object sender)
        {
            this.RaiseSaveClickEventHander();
        }

        private void ucToolBar_SaveDataByIDClick(object sender)
        {
            this.RaiseSaveDataByIdClickEventHander();
        }

        private void ucToolBar_SaveLayoutClick(object sender)
        {
            this.RaiseSaveLayoutClickEventHander();
        }

        private void ucToolBar_SaveNewClick(object sender)
        {
            this.RaiseSaveNewClickEventHander();
        }

        private void ucToolBar_SaveTempClick(object sender)
        {
            this.RaiseSaveTempClickEventHander();
        }

        private void ucToolBar_SaveToFileClick(object sender)
        {
            this.RaiseSaveToFileClickEventHander();
        }

        private void ucToolBar_SearchClick(object sender)
        {
            this.RaiseSearchClickEventHander();
        }

        private void ucToolBar_SelectAllClick(object sender)
        {
            this.RaiseSelectAllClickEventHander();
        }

        public xucToolBarB Bar
        {
            get
            {
                return this.ucBar;
            }
        }
    }
}
